Unit UnityDegisenSiparis;

Interface

Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UnitySiparis, Menus, ADODB, DB, Grids, Wwdbigrd, Wwdbgrid,
  StdCtrls, Buttons, Wwdotdot, Wwdbcomb, Mask, wwdbedit, ExtCtrls;

Type
  TUnityDegisenSiparisF = Class(TUnitySiparisF)
    beskisiparisb: TBitBtn;
    wwDBComboBox3: TwwDBComboBox;
    Label8: TLabel;
    Procedure bkapatClick(Sender: TObject);
    Procedure FormShow(Sender: TObject);
    Procedure FormClose(Sender: TObject; Var Action: TCloseAction);
    Procedure beskisiparisbClick(Sender: TObject);
  Private
    { Private declarations }
  Public
    { Public declarations }
  End;

Var
  UnityDegisenSiparisF: TUnityDegisenSiparisF;

Implementation

Uses ana1;

{$R *.dfm}

Procedure TUnityDegisenSiparisF.bkapatClick(Sender: TObject);
Begin
  close;
End;

Procedure TUnityDegisenSiparisF.FormShow(Sender: TObject);
Begin
  Left := (Screen.Width - Width) Div 2;
  Top := ((Screen.Height - Height) Div 2) - 80;

  Siparis.Close;
  Siparis.SQL.text :=
    'select carikodu=(select carikodu from cari where cari.carikod=unity_degisensiparis_2006.carikod),firmaadi=(select firmaadi from cari where cari.carikod=unity_degisensiparis_2006.carikod),';
  Siparis.SQL.add('temsilcisi=(select temsilcisi from cari where cari.carikod=unity_degisensiparis_2006.carikod),* from unity_degisensiparis_2006  where id=' + inttostr(SiparisID));
  Siparis.Open;

  Siparishar.Close;
  Siparishar.SQL.text :=
    'select stokkodu=(select stokkodu from stok where stok.stokkod=unity_degisensiparishar_2006.stokkod),';
  Siparishar.SQL.add('cinsi=(select stokkodu from stok where stok.stokkod=unity_degisensiparishar_2006.stokkod),');
  Siparishar.SQL.add('ozkod1=(select ozkod1 from stok where stok.stokkod=unity_degisensiparishar_2006.stokkod),* from unity_degisensiparishar_2006 ');
  Siparishar.SQL.add('where siparisid=' + inttostr(SiparisID));
  Siparishar.Open;
End;

Procedure TUnityDegisenSiparisF.FormClose(Sender: TObject;
  Var Action: TCloseAction);
Begin
  Action := cafree;
  UnityDegisenSiparisF := Nil;
End;

Procedure TUnityDegisenSiparisF.beskisiparisbClick(Sender: TObject);
Begin
  UnitySiparisF := tUnitySiparisF.create(Anaform);
  UnitySiparisF.SiparisID := SiparisID;
  UnitySiparisF.FormStyle := fsmdichild;
End;

End.
